package com.liao.badminton.vo;

import com.liao.badminton.code.BaseField;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.lang.String;
import java.util.Date;
import java.util.List;
import lombok.Data;
import com.liao.badminton.entity.BoutStat;
/**
* @author liaocheng
* @date 2024-11-01
* description:录入对局统计表
*/
@Data
public class BoutStatVo  extends BaseField {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "录入记录id")
    private Long importRecordId;

    @ApiModelProperty(value = "用户和群id")
    private Long userGroupRefId;


    @ApiModelProperty(value = "用户在群名称")
    private String userGroupName;

    @ApiModelProperty(value = "总局数")
    private Integer totalBout;

    @ApiModelProperty(value = "胜局数")
    private Integer winBout;

    @ApiModelProperty(value = "负局数")
    private Integer loseBout;

    @ApiModelProperty(value = "总得分:胜-负")
    private Integer totalScore;

    @ApiModelProperty(value = "奖励金币")
    private BigDecimal awardCoin;

    @ApiModelProperty(value = "文本内容:user_name的所以对局内容")
    private String txtContent;

    private List<Long> delIds;  //批量删除ids

    public static BoutStatVo invertToVo(BoutStat boutStat){
        BoutStatVo vo = new BoutStatVo();
        BaseField.invert(boutStat, vo);
        vo.setId(boutStat.getId());
        vo.setImportRecordId(boutStat.getImportRecordId());
        vo.setUserGroupRefId(boutStat.getUserGroupRefId());
        vo.setTotalBout(boutStat.getTotalBout());
        vo.setWinBout(boutStat.getWinBout());
        vo.setLoseBout(boutStat.getLoseBout());
        vo.setTotalScore(boutStat.getTotalScore());
        vo.setAwardCoin(boutStat.getAwardCoin());
        vo.setTxtContent(boutStat.getTxtContent());
        return vo;
    }
}
